home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_joe.idb / usr / freeware / lib / joe / jmacsrc.z / jmacsrc
Encoding:
Text File  |  1999-01-26  |  16.0 KB  |  511 lines

  1.  
  2.                          Initialization file for JOE
  3.                                 Gnu-Emacs Joe
  4.  
  5.  JOE looks for this file in:
  6.     1 - .jmacsrc
  7.     2 - $HOME/.jmacsrc
  8.     3 - /usr/local/lib/jmacsrc
  9.  
  10.  This file can include other files by placing the following include command
  11.  in the first column:
  12.  
  13.  :include filename
  14.  
  15.  FIRST SECTION: Default global options (these options can also be specified
  16.  on the command line.  Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
  17.  options can be specified in environment variables):
  18.  
  19.  Put each option you want set in the first column:
  20.  
  21.  -option    Sets the option
  22.  --option    Clears the option
  23.  
  24.  -mid        Cursor is recentered when scrolling is necessary
  25.  -marking    Text between ^KB and cursor is highlighted
  26.  -asis        Characters 128 - 255 shown as-is
  27.  -force        Force final newline when files are saved
  28.  -nobackups    If you don't want backup files to be created
  29.  -lightoff    Turn off highlighting after block copy or move
  30.  -exask        ^KX always confirms file name
  31. -beep        Beep on errors and when cursor goes past extremes
  32.  -nosta        Disable top-most status line
  33.  -keepup    %k and %c status line escape sequences updated frequently
  34. -pg 1        No. lines to keep for PgUp/PgDn
  35. -csmode        ^KF after a pervious search does a ^L instead
  36.  -backpath path Directory to store backup files
  37.  -nonotice    Disable copyright notice
  38. -noxon        Attempt to turn off ^S/^Q processing
  39. -orphan        Put extra files given on command line in orphaned buffers
  40.         instead of in windows
  41. -dopadding    Output pad characters (for when there is no tty handshaking)
  42.  -lines nnn    Set no. screen lines
  43.  -baud nnn    Set baud rate for terminal optimizations
  44.  -columns nnn    Set no. screen columns
  45.  -help        Start with help on
  46.  -skiptop nnn    Don't use top nnn lines of the screen
  47.  
  48.  Status line definition strings.  -lmsg defines the left-justified string and
  49.  -rmsg defines the right-justified string.  The first character of -rmsg is
  50.  the background fill character.  The following escape sequences can be used
  51.  in these string:
  52.  
  53.   %t  12 hour time
  54.   %u  24 hour time
  55.   %T  O for overtype mode, I for insert mode
  56.   %W  W if wordwrap is enabled
  57.   %I  A if autoindent is enabled
  58.   %X  Rectangle mode indicator
  59.   %n  File name
  60.   %m  '(Modified)' if file has been changed
  61.   %*  '*' if file has been changed
  62.   %R  Read-only indicator
  63.   %r  Row (line) number
  64.   %c  Column number
  65.   %o  Byte offset into file
  66.   %O  Byte offset into file in hex
  67.   %a  Ascii value of character under cursor
  68.   %A  Ascii value of character under cursor in hex
  69.   %k  Entered prefix keys
  70.   %p  Percent of file cursor is at
  71.   %l  No. lines in file
  72.   %S  '*SHELL*' if there is a shell running in window
  73.   %M  Macro recording message
  74.  
  75.  The formatting escape sequences may also be given:
  76.  
  77.   \i  Inverse
  78.   \u  Underline
  79.   \b  Bold
  80.   \d  Dim
  81.   \f  Blink
  82.  
  83. -lmsg \i%k%T%W%I%X %* [%n] %M
  84. -rmsg  %S Row %r Col %c %t  Ctrl-X H for help
  85.  
  86.  SECOND SECTION: File name dependant local option settings:
  87.  
  88.  Each line with '*' in the first column indicates the modes which should be
  89.  files which match the regular expression.  If more than one regular
  90.  expression matches the file name, than the last matching one is chosen.
  91.  
  92.  Here is a list of modes which can be set:
  93.  
  94.     -wordwrap        Wordwrap
  95.     -autoindent        Auto indent
  96.     -overwrite        Overtype mode
  97.     -lmargin nnn        Left margin
  98.     -rmargin nnn        Right margin
  99.     -tab nnn        Tab width
  100.     -indentc nnn        Indentation character (32 for space, 9 for tab)
  101.     -istep nnn        Number of indentation columns
  102.     -french            One space after '.', '?' and '!' for wordwrap
  103.                 and paragraph reformat instead of two.  Joe
  104.                 does not change the spacing you give, but
  105.                 sometimes it must put spacing in itself.  This
  106.                 selects how much is inserted.
  107.  
  108.     -spaces            TAB inserts spaces instead of tabs.
  109.  
  110.     -linums            Enable line numbers on each line
  111.     -rdonly            File is read-only
  112.     -keymap name        Keymap to use if not 'main'
  113.     -lmsg            Status line definition strings-
  114.     -rmsg            see previous section for more info.
  115.     -mnew macro        Macro to execute when new files are loaded
  116.     -mold macro        Macro to execute when existing files are loaded
  117.     -msnew macro        Macro to execute when new files are saved
  118.     -msold macro        Macro to execute when existing files are saved
  119.  
  120.     Macros for the above options are in the same format as in the key
  121.     binding section below- but without the key name strings.
  122.  
  123. *
  124. -wordwrap
  125.  
  126. *.c
  127. -autoindent
  128.  
  129. *.h
  130. -autoindent
  131.  
  132. *akefile
  133.  
  134. *AKEFILE
  135.  
  136. *rc
  137.  
  138. *.p
  139. -autoindent
  140.  
  141.  THIRD SECTION: Named help screens:
  142.  
  143.  Use \i to turn on/off inverse video
  144.  Use \u to turn on/off underline
  145.  Use \b to turn on/off bold
  146.  Use \d to turn on/off dim
  147.  Use \f to turn on/off flash
  148.  
  149. {Basic
  150. \i   Help Screen    turn off with ^XH   more help with ^X.                       \i
  151. \i \i\uCURSOR\u           \uGO TO\u           \uUNDO\u      \uMISC\u        \uREGION\u     \uEXIT\u       \i \i
  152. \i \i^B left ^F right ^[V prev screen ^XU undo  ^[^[ option ^@  mark   ^XK  quit  \i \i
  153. \i \i^P up   ^N down  ^V  next screen ^^  redo  ^[Q format  ^W  cut    ^X^C save  \i \i
  154. \i \i^[B prev. word   ^A  beg of line \uDELETE\u    ^L  refresh ^Y  paste  \uFILE\u       \i \i
  155. \i \i^[F next word    ^E  end of line ^D  char  ^[$ spell   ^[Y switch ^X^W save  \i \i
  156. \i \i\uSEARCH\u           ^[< top of file ^K  >line ^[M math    ^XA save   ^XI  insert\i \i
  157. \i \i^S  forward      ^[> end of file ^[D >word ^[% query   ^[| filter ^X^F load  \i \i
  158. \i \i^R  backward     ^[G to line No. ^[ DEL word<  replace ^XX swap   ^X^B switch\i \i
  159. }
  160.  
  161. {Editing 
  162. \i   Help Screen    turn off with ^XH   prev. screen ^X,  next screen ^X.        \i
  163. \i \i\uCASE\u           \uTRANSPOSE\u  \uINSERT\u    \uMACROS\u            \uPROGRAMS\u               \i \i
  164. \i \i^[U  Up word   ^T   Chars ^O  line  ^X( record        ^X^I Indent region     \i \i
  165. \i \i^[D  Down word ^[T  Words ^C  space ^X) stop          ^[.  Tags file find    \i \i
  166. \i \i^[C  Cap. word ^X^T Lines `   Ctrl- ^XE play          ^XG  To matching ( [ { \i \i
  167. \i \i^X^U Up region            ^XT text  ^XQ query suspend ^XC  Parse errors      \i \i
  168. \i \i^X^L Down region                    ^U  repeat prefix ^XN / ^XP next/prev err\i \i
  169. }
  170.  
  171. {Window
  172. \i   Help Screen    turn off with ^XH   prev. screen ^X,  next screen ^X.        \i
  173. \i \i\uWINDOW\u                      \uSCROLL\u     \uSHELL\u       \uCURSOR\u                    \i \i
  174. \i \i^X2  Split window in half   ^X^P up    ^Z  Suspend ^[P prev. paragraph       \i \i
  175. \i \i^XO  Switch to other window ^X^N down  ^[! Command ^[N next paragraph        \i \i
  176. \i \i^XZ  Grow window            ^X<  left  ^[' Window  ^XG to matching ( [ {     \i \i
  177. \i \i^X^Z Shrink window          ^X>  right             \uBOOKMARK\u                  \i \i
  178. \i \i^X0  Kill window                                   ^XJ set                   \i \i
  179. \i \i^X1  Kill all other windows                        ^X/ goto                  \i \i
  180. }
  181.  
  182. {Search
  183. \i   Help Screen    turn off with ^XH   prev. screen ^X,  next screen ^X.        \i
  184. \i \iSpecial search sequences:                                                    \i \i
  185. \i \i    \\^  \\$  matches beg./end of line     \\?     match any single char        \i \i
  186. \i \i    \\<  \\>  matches beg./end of word     \\*     match 0 or more chars        \i \i
  187. \i \i    \\c     matches balanced C expression \\\\     matches a \\                  \i \i
  188. \i \i    \\[..]  matches one of a set          \\n     matches a newline            \i \i
  189. \i \i    \\+     matches 0 or more of the character which follows the \\+           \i \i
  190. \i \iSpecial replace sequences:                                                   \i \i
  191. \i \i    \\&     replaced with text which matched search string                    \i \i
  192. \i \i    \\0 - 9 replaced with text which matched Nth \\*, \\?, \\c, \\+, or \\[..]     \i \i
  193. \i \i    \\\\     replaced with \\               \\n     replaced with newline        \i \i
  194. }
  195.  
  196. {Names
  197. \i   Help Screen    turn off with ^XH   prev. screen ^X,  next screen ^X.        \i
  198. \i \i Hit TAB at file name prompts to generate menu of file names                 \i \i
  199. \i \i Or use up/down keys to access history of previously entered names           \i \i
  200. \i \i Special file names:                                                         \i \i
  201. \i \i      !command                 Pipe in/out of a shell command                \i \i
  202. \i \i      >>filename               Append to a file                              \i \i
  203. \i \i      -                        Read/Write to/from standard I/O               \i \i
  204. \i \i      filename,START,SIZE      Read/Write a part of a file/device            \i \i
  205. \i \i          Give START/SIZE in decimal (255), octal (0377) or hex (0xFF)       \i \i
  206. }
  207.  
  208. {Joe
  209. \i   Help Screen    turn off with ^XH   prev. screen ^X,                         \i
  210. \i \i Joe Allen's email address:  'jhallen@world.std.com'                         \i \i
  211. }
  212.  
  213.  FOURTH SECTION: Key bindings:
  214.  
  215.  Section names you must provide:
  216.  
  217.     :main        For editing window
  218.     :prompt        For prompt lines
  219.     :query        For single-character query lines
  220.     :querya        Singe-character query for quote
  221.     :querysr    Search & Replace single-character query
  222.  
  223.  Other sections may be given as well for organization purposes or for
  224.  use with the '-keymap' option.
  225.  
  226.  Use:
  227.  :inherit name        To copy the named section into the current one
  228.  :delete key        To delete a key sequence from the current section
  229.  
  230.  Keys:
  231.  
  232.  Use ^@ through ^_ and ^? for Ctrl chars
  233.  Use SP for space
  234.  Use a TO b to generate a range of characters
  235.  
  236.  You can also use termcap string capability names.  For example:
  237.  
  238.     .ku        Up
  239.     .kd        Down
  240.     .kl        Left
  241.     .kr        Right
  242.     .kh        Home
  243.     .kH        End
  244.     .kI        Insert
  245.     .kD        Delete
  246.     .kP        PgUp
  247.     .kN        PgDn
  248.     .k1 - .k9    F1 - F9
  249.     .k0        F0 or F10... you decide.
  250.     .k;        F10
  251.  
  252.  Macros:
  253.  
  254.  Simple macros can be made by comma seperating 2 or more command names.  For
  255.  example:
  256.  
  257.  bof,bol    ^T Z        Goto beginning of last line
  258.  
  259.  Also quoted matter is typed in literally:
  260.  
  261.  bol,">",dnarw    .k1        Quote news article line
  262.  
  263.  Macros may cross lines if they end with ,
  264.  
  265. :windows        Bindings common to all windows
  266. type        ^@ TO          Self insert
  267. abort        ^G        Abort window
  268. abort        ^X ^C
  269. abort        ^C
  270. tw0        ^X 0        Delete window: can make orphan buffers
  271. tw1        ^X 1        Delete other windows: can make orphan buffers
  272. uarg        ^U        Repeat prefix
  273. uarg        ^[ -
  274. uarg        ^[ 0 TO 9
  275. help        ^X h        Help
  276. help        ^X ^H
  277. hnext        ^X .
  278. hprev        ^X ,
  279. math        ^[ m        Calculator
  280. math        ^[ M
  281. nextw        ^X o        Other window
  282. pgdn        .kN        Screen down
  283. pgdn        ^V
  284. pgdn        ^[ [ 6 ~
  285. pgup        .kP        Screen up
  286. pgup        ^[ v
  287. pgup        ^[ [ 5 ~
  288. play,"0"    ^X e        Execute keyboard macro
  289. prevw        ^X p        Previous window (uemacs)
  290. query        ^X q        Query insert
  291. record,"0"    ^X (        Record macro
  292. retype        ^L        Refresh screen
  293. rtn        ^M        Return
  294. shell        ^Z        Suspend
  295. shell        ^[ s        Suspend (uemacs)
  296. stop        ^X )        Stop recording macro
  297.  
  298. :main            Text editing window
  299. :inherit windows
  300.  
  301.   Spell-check macros
  302.  
  303. :def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
  304. :def spellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
  305.  
  306. spellword    ^[ $
  307.  
  308. ctrl        ^Q        Quote Ctrl chars
  309. ctrl        `        Quote Ctrl chars
  310.  
  311.   Macros of non-existant emacs functions
  312.  
  313. psh,nextword,markk,prevword,markb,filt,
  314. "tr [a-z] [A-Z]",rtn,nextword    ^[ u        Upcase word
  315. psh,nextword,markk,prevword,markb,filt,
  316. "tr [A-Z] [a-z]",rtn,nextword    ^[ l        Downcase word
  317. psh,nextword,markk,prevword,markb,filt,
  318. "tr [A-Z] [a-z]",rtn,rtarw,markk,filt,
  319. "tr [a-z] [A-Z]",rtn,nextword    ^[ c        Capitalize word
  320. psh,markk,filt,"tr [A-Z] [a-z]",rtn        ^X ^L    Downcase region
  321. psh,markk,filt,"tr [a-z] [A-Z]",rtn        ^X ^U    Upcase region
  322. psh,ltarw,markb,rtarw,markk,rtarw,
  323. blkmove,rtarw    ^T                Transpose chars
  324. psh,uparw,bol,markb,dnarw,markk,
  325. dnarw,blkmove,dnarw        ^X ^T        Transpose lines
  326. psh,prevword,markb,nextword,
  327. nextword,prevword,markk,nextword,
  328. nextword,prevword,blkmove,nextword    ^[ t    Transpose words
  329. eop,bop,markb,eop    ^[ h            Mark paragraph
  330. nextword,prevword,markb,nextword    ^[ @    Mark word
  331. "()",ltarw        ^[ (            Insert ()
  332. bol,insc,delw        ^[ ^            Delete indentation
  333. psh,markk,copy,msg,"Region saved",rtn    ^[ w    Yank copy
  334. mode,"Rcol",rtn,
  335. msg,"Fill-column set",rtn        ^X f    Set right margin
  336. bol,rtn,backw,rtn,rtn,uparw,delw    ^X ^O    Delete blank lines
  337. " ",backw," ",insc,delw    ^[ SP            Just one space
  338. " ",backw,insc,delw    ^[ \            Delete horizontal space
  339. stop,msg,"Abort",rtn    ^G            Abort message
  340. stop,msg,"Abort",rtn    ^[ ^G            Abort message
  341. stop,msg,"Abort",rtn    ^X ^G            Abort message
  342. psh,markk,blkdel    ^W            Cut
  343. save,rtn        ^X ^S            Save file
  344. ask            ^X s
  345. drop,msg,"Mark set",rtn    ^@            Drop anchor
  346. nextw,pgdn,prevw    ^[ ^V            Scroll other window down
  347. nextw,pgup,prevw    ^[ ^Z            Scroll other window up
  348.  bol,nedge,pedge    ^[ m            Gnu-emacs goto indentation
  349. nextw,nbuf,prevw    ^X 4 b            Switch buffers other window
  350. nextw,edit,query,prevw    ^X 4 f            Find file other window
  351. nextw,edit,query,prevw    ^X 4 ^F
  352. nextw,tag,query,prevw    ^X 4 .            Find tag other window
  353.  ask,query,lose,query,abortbuf    ^X ^C        Gnu-emacs: Abort buffer in window
  354. exsave            ^X ^C            Save file and exit
  355. lose,query,abortbuf    ^X k            Kill buffer in window
  356. lose,query,edit        ^X ^V            Edit a file: no orphaned buffers
  357. psh,drop,fwrdc,query,markk,blkdel    ^[ z    Cut to char
  358. psh,markk,blksave,">>",query    ^X a        Append region to file
  359. retype,
  360. arg,"top+height/2-line",rtn,upslide    ^L    Recenter
  361. arg,"top+height/2-line",rtn,dnarw    ^[ r    Move to center line
  362. swap,math,"z=line",rtn,
  363. swap,msg,math,"line-z",rtn,
  364. " lines in region",rtn            ^[ =    Count lines region
  365. mode,"O"                ^X ^Q    Toggle read-only
  366.  
  367. edit,rtn,filt,query,parserr        ^X c    Compile
  368. nxterr                    ^X n
  369. prverr                    ^X p
  370.  
  371. backs        ^?        Backspace
  372. backs        ^H
  373. backw        ^[ ^?        Backspace word
  374. backw        ^[ ^H
  375. bknd        ^X '        Shell window (joe)
  376. bof        ^[ <        Goto beginning of file
  377. bol        .kh        Goto beginning of line
  378. bol        ^A
  379. bop        ^[ p        (uemacs)
  380. bufed        ^X b
  381. bknd        ^[ '        Shell window
  382. crawlr        ^X >        Scroll to the right
  383. crawll        ^X <        Scroll to the left
  384. delch        .kD        Delete character
  385. delch        ^D
  386. deleol        ^K        Delete to end of line
  387. delw        ^[ d        Delete word
  388. dnarw        .kd        Go down
  389. dnarw        ^N
  390. dnarw        ^[ O B
  391. dnarw        ^[ [ B
  392. dnslide        ^X ^N        Slide down (uemacs)
  393. edit        ^X ^F        Edit a file: creates orphaned buffers
  394. eof        ^[ >        Go to end of file
  395. eol        .kH        Go to end of line
  396. eol        ^E
  397. eop        ^[ n        (uemacs)
  398. execmd        ^[ x
  399. insc        ^C        (uemacs)
  400.  ffirst        ^S        Search forward
  401. isrch        ^S
  402. ffirst        ^\
  403. psh,markk,filt,query    ^[ |        Filter block
  404. format        ^[ q        Format paragraph
  405. gomark        ^X /        Goto bookmark
  406. groww        ^X ^        Enlarge window
  407. groww        ^X z        (uemacs)
  408. insf        ^X i        Insert a file
  409. yapp        ^[ ^W        Append next kill
  410. line        ^[ g        Goto line (uemacs)
  411. ltarw        .kl        Go left
  412. ltarw        ^B
  413. ltarw        ^[ O D
  414. ltarw        ^[ [ D
  415. mode        ^[ ^[        Change modes
  416. nbuf        ^X ^B        Next buffer in current window
  417. nbuf        ^X x        (uemacs)
  418.  nextpos        ^K =        Goto next position in position history
  419. nextword    ^[ f        Goto next word
  420. notmod        ^[ ~        Not modified
  421. open        ^O        Split line
  422. open        ^[ ^O
  423.  pbuf        ^X b        Previous buffer in current window
  424.  prevpos        ^K -    Goto previous position in position history
  425. prevword    ^[ b        Previous word
  426. qrepl        ^[ %        Query replace
  427.  qrepl        ^[ r        Query replace (uemacs)
  428. qrepl        ^[ ^R        Query replace (uemacs)
  429. redo        ^^        Redo changes
  430.  rfirst        ^R        Search backwards
  431. rsrch        ^R        Incremental search backwards
  432. rindent        ^X ^I        Indent to the right
  433. rindent        ^[ ^\
  434. rtarw        .kr        Go right
  435. rtarw        ^F
  436. rtarw        ^[ O C
  437. rtarw        ^[ [ C
  438. run        ^[ !
  439. save        ^X ^W        Write file
  440. setmark        ^X j        Set bookmark
  441. shrinkw        ^X ^Z        (uemacs)
  442. splitw        ^X 2        Split window
  443. stat        ^X l        Show status
  444. stat        ^X =
  445. swap        ^X ^X        Swap mark and cursor
  446. tag        ^[ .        Tag search
  447. tomatch        ^X g        Goto matching parenthasis (joe)
  448. tomatch        ^[ ^F        (uemacs)
  449. txt        ^X t        Prompt for text to insert
  450. undo        ^_        Undo changes
  451. undo        ^X u
  452. uparw        .ku        Go up
  453. uparw        ^P
  454. uparw        ^[ O A
  455. uparw        ^[ [ A
  456. upslide        ^X ^P        Slide up (uemacs)
  457. yank        ^Y        Yank deleted text
  458. yankpop        ^[ y        Yank-pop
  459.  
  460. :prompt            Prompt windows
  461. :inherit main
  462. abort        ^G
  463. abort        ^C
  464. complete    ^I
  465.  
  466. :menu            Selection menus
  467. :inherit windows
  468. abort        ^[ ^[
  469. backsmenu    ^?
  470. backsmenu    ^H
  471. bofmenu        ^K U
  472. bofmenu        ^K ^U
  473. bofmenu        ^K u
  474. bolmenu        .kh
  475. bolmenu        ^A
  476. dnarwmenu    .kd
  477. dnarwmenu    ^N
  478. dnarwmenu    ^[ [ B
  479. dnarwmenu    ^[ O B
  480. eofmenu        ^K V
  481. eofmenu        ^K ^V
  482. eofmenu        ^K v
  483. eolmenu        .kH
  484. eolmenu        ^E
  485. ltarwmenu    .kl
  486. ltarwmenu    ^B
  487. ltarwmenu    ^[ [ D
  488. ltarwmenu    ^[ O D
  489. rtarwmenu    .kr
  490. rtarwmenu    ^F
  491. rtarwmenu    ^[ [ C
  492. rtarwmenu    ^[ O C
  493. rtn        SP
  494. rtn        ^I
  495. rtn        ^X H
  496. rtn        ^X h
  497. rtn        ^X ^H
  498. uparwmenu    .ku
  499. uparwmenu    ^P
  500. uparwmenu    ^[ [ A
  501. uparwmenu    ^[ O A
  502.  
  503. :querysr        Search & replace query window
  504. type        ^@ TO  
  505.  
  506. :query            Single-key query window
  507. :inherit windows
  508.  
  509. :querya            Single-key query window for quoting
  510. type        ^@ TO  
  511.